KVM switch including a terminal emulator

ABSTRACT

A method and system for converting the output of a communications port (e.g., a serial port or a USB port) into video signals representing the output of a terminal using a KVM switch. Upon receiving characters from the communications port, the system interprets the characters as terminal emulation commands and internally generates a representation of what a resulting terminal screen would look like. From that internal (digital) representation, the system produces analog outputs representing the terminal screen. The analog outputs are output on the monitor attached to the KVM switch.

CROSS REFERENCE TO RELATED APPLICATIONS

The present application is a continuation of U.S. application Ser. No.10/408,250 filed Apr. 8, 2003, which is a continuation of U.S.application Ser. No. 09/683,851, filed Feb. 22, 2002, now U.S. Pat. No.6,567,869, which is a continuation of U.S. application Ser. No.09/382,544, filed Aug. 25, 1999, now U.S. Pat. No. 6,378,014. The entirecontents of all of those applications are herein incorporated byreference in their entirety.

BACKGROUND OF INVENTION

1. Field of the Invention

The present invention is directed to a terminal emulator for use with akeyboard, video and mouse (KVM) switch. More specifically, the presentinvention provides a converter interposed between a communicationsinterface (e.g., a serial or USB port) of a computer and the three partKVM interface of a KVM switch for converting the (serial) communicationsinto video signals representing a terminal.

2. Description of the Background

Apex Inc., the assignee of the present invention, produces and sells aseries of switches that enable a single keyboard, mouse and monitor tologically connect to any one of several computers simultaneously. Oneembodiment of a KVM switch 74 is shown in the block diagram of FIG. 1.Using commands from a keyboard 122, the user may switch between theseveral computers (100 a through 100 c). Internally, based on theselection, the switch 74 establishes a set of three connections from thecomputer-interface side to the user-interface side. Accordingly, theoutput of the video card of one of the computers is displayed on thevideo monitor 120 when that computer is selected, and the signals fromthe keyboard 122 and the mouse 124 are directed to the selected computeras if the keyboard 122 and mouse 124 were directly connected to theselected computer.

Terminal emulators are also known. One use of terminal emulators is todebug the operation of a computer's operating system. Since controllingthe monitor is complex for low-level operating system code, it is oftenimpractical to write error messages to a screen to track operations ofthe operating system. As a result, some operating systems providesupport for sending status messages to the serial port of the computer.Such a technique is far less complicated than writing to the screen.

To view the status messages, a terminal (or a computer running aterminal emulator) is connected to the serial port, and the output fromthe serial port is interpreted as a stream of terminal commands. Thoseterminal commands enable text to be written to the terminal's screen.Those commands also provide additional control functions such asclearing the screen and changing the attributes (e.g., underlining,inverted color, blinking, and foreground and background color) of adisplayed character.

SUMMARY OF INVENTION

It is an object of the present invention to convert the output of acommunications port (e.g., a serial port or a USB port) of a computerinto analog video signals that can be applied to the monitor input of aKVM switch without using a separate computer running a terminal emulatorprogram. The communications port also receives as inputs commandscorresponding to changes in a keyboard and/or mouse connected to the KVMswitch.

This and other objects of the present invention are provided through aconverter that is interposed between the communications port and the KVMswitch. The converter includes an analyzer for analyzing the digitaloutput of a communications port and interpreting the digital output as aseries of emulator commands. The analyzer determines the resultingdigital representation of the location and attributes of the text as thetext would appear on a corresponding terminal. Using the digitalrepresentation, the analyzer generates an equivalent analog signal inRGB format. That RGB format can then be applied to a monitor input ofthe KVM switch just like any other connected computer.

Likewise, in the opposite direction, status changes for the keyboardand/or mouse connected to the KVM switch are sent to the connector andconverted to commands which are sent to the communications port. In thecase of a bi-directionally communicating mouse and/or keyboard, commandscan be sent from the communications port to the converter as well.

BRIEF DESCRIPTION OF DRAWINGS

A more complete appreciation of the invention and many of the attendantadvantages thereof will become readily apparent with reference to thefollowing detailed description, particularly when considered inconjunction with the accompanying drawings, in which:

FIG. 1 is a block diagram of an illustrative, known KVM switch connectedto (a) plural computers on the computer-interface side and (b) akeyboard, mouse and monitor on the user-interface side;

FIG. 2 is a block diagram of the terminal converter of the presentinvention replacing one of the computers of FIG. 1;

FIG. 3 is a block diagram of a first embodiment of the converteraccording to the present invention;

FIG. 4 is a block diagram of a second embodiment of the converteraccording to the present invention;

FIG. 5 is a block diagram of a third embodiment of the converteraccording to the present invention;

FIG. 6 is a block diagram of a fourth embodiment of the converteraccording to the present invention;

FIG. 7 is a block diagram of a fifth embodiment of the converteraccording to the present invention;

FIG. 8 is a block diagram of a sixth embodiment of the converteraccording to the present invention;

FIG. 9 is a block diagram of a KVM switch incorporating a converteraccording to the present invention;

FIG. 10 a is a block diagram of a portion of the memory of the converterthat includes the characters to be displayed and their attributes;

FIG. 10 b is an illustration of the equivalent virtual layout of theterminal being emulated using the contents of the memory illustrated inFIG. 9 a; and

FIG. 10 c is a bitmap representation of one of the characters to bedisplayed by the converter.

DETAILED DESCRIPTION

Referring now to the drawings, in which like reference numeralsdesignate identical or corresponding parts throughout the several views,FIG. 2 is a block diagram showing one use of a converter 200 accordingto the present invention. In this environment, a user is able to controlmultiple computers (100 a and 100 b) using a single keyboard 122 andmouse 124. Using commands from a keyboard 122 (and optionally the mouse124 with or without a keyboard modifier), the user may switch betweenthose computers (100 a and 100 b). In addition to being able to selectthe KVM outputs of computer 100 b, it is desirable to allow a user tosee the output of the communications port 210. To provide thiscapability, the communications port 210 is connected to a converter 200(that acts as a terminal emulator) using a cable 205. In a preferredembodiment of the present invention, the communications port 210 is aserial interface and the cable 205 is a null modem cable. The presentinvention, however, is not limited to direct serial communication. Inalternate embodiments, the communications port 210 is a USB port or aparallel port and the cable 205 is a corresponding USB or parallelcable. In yet another alternate embodiment, the cable 205 is replaced bya pair of modems and a telephone connection.

The four above configurations provide “direct” communication with thecomputer 100 b. As used herein, the phrase “direct communication” meansthat the communication protocol correctly assumes that communication iswith only one device. Accordingly, a header (including a deviceidentifier) is not needed before each group (or packet) of information.On the other hand, the phrase “indirect communication” meanscommunication with devices that require a header to identify therecipient of the communication. One example of indirection communicationis the use of Ethernet cards that utilize packets with headers tocommunication information to the appropriate one of many Ethernetdevices.

As shown in FIGS. 3 through 7, the present invention includes severalpossible embodiments. In each embodiment, the present inventioninternally maintains a digital representation of a virtual terminalwhose appearance is controlled by commands from the communications port210 (of the computer 100 b shown in FIG. 2). The digital representationis converted to a set of analog RGB outputs that are output on analogterminal outputs 20. Keyboard commands are received on the keyboardinputs 22 and forwarded to the communications port 210. In embodimentswhere the terminal supports mouse movements and commands, the mousecommands are received on mouse interface 24 and are forwarded to thecommunications port 210.

As shown in FIG. 3, the cable 205 is connected to a driver 250. Thedriver converts the voltages and currents on the cable 205 to voltagesand currents that can be accepted by a field programmable gate array(FPGA) 230 (or a microprocessor as shown in subsequent figures).Examples of FPGAs are the XC3000 series, the XC4000 series, the XC5200series and the Spartan series from Xilinx, Inc., of San Jose Calif.(Additional details of the architectures and programming requirements ofthose series are found in the Programmable Logic Data Book, 1998edition, the contents of which are incorporated herein by reference.Alternate logic devices from other companies can likewise be used withthe present invention.) In a preferred embodiment, an emitter followeris used to convert voltages and currents from the FPGA to voltages andcurrents that fall within the specifications for the monitor for normalRGB video signals. Having converted the signals from the communicationsport 210, the FPGA 230 interprets the commands to determine how thevirtual (emulated) terminal is changed based on those commands. One suchcommand simply adds an ASCII character at the current cursor locationand advances the cursor to the next location of the virtual terminal.Other commands (e.g., carriage return and line feed) change the positionwhere the next character will be inserted.

The FPGA 230 stores the digital representation of the virtual terminalin the RAM 245. Also stored in the RAM 245 are buffered commands thathave been received from the driver 250 but which have not yet been actedon by the FPGA 230. The control logic for interpreting the commands(thereby emulating the terminal) and outputting the analog video signalsare contained in a ROM 240 which configures the FPGA 230. One example ofa ROM 240 is a serial non-volatile memory (e.g., EPROM) with asingle-bit wide data bus and a clock signal. Another embodiment of theROM 240 is a non-volatile memory (e.g., EPROM, EEPROM, Flash ROM, orFRAM) with a multi-bit address and data bus. In either embodiment, thenon-volatile memory is preferably a rewriteable memory that can beupdated to provide additional features or corrections.

In order to reduce the size of the FPGA required to perform the terminalemulation, the FPGA can be dynamically reconfigured to change from oneformat (e.g., ANSI) to another format (e.g., VT100) by loading theappropriate format from a ROM connected to the FPGA. In this manner, theFPGA 230 need only provide enough logic gates to (1) provide dynamicreconfiguration and (2) emulate one terminal type at a time.

One embodiment of the driver 250 in FIGS. 3 and 5 is the SL16 fromScanLogic Corp of Bedford, Mass. The SL16 provides USB communicationswith external devices. (Additional details of the SL16 architecture canbe found in SL16 Hardware Specification: Technical Reference, Revision1.20 dated Jul. 14, 1998, the contents of which are incorporated hereinby reference.) In the second embodiment shown in FIG. 4, a driver 250′is incorporated into the FPGA 230 (as opposed to using the externaldriver 250 in FIG. 3). Using digital logic cells and analog I/O blocksof the FPGA, the FPGA 230 communicates directly with the communicationsport 210 across cable 205. In an alternate embodiment to that of FIG. 4,the drivers 255 are also included into the FPGA, thereby furtherreducing the number of chips required to emulate a terminal.

The present invention, however, is not limited to using FPGAs to emulatethe terminal. In one alternate embodiment, the FPGA is replaced by aone-time programmable (OTP) device or an application specific integratedcircuit (ASIC). Alternatively, as shown in FIG. 5, in the thirdembodiment of the present invention, an embedded controller 270(including RAM 245 and ROM 240) communicates with the communicationsport 210 through the driver 250.

In the embodiment of the present invention shown in FIG. 6, an embeddedcontroller 280 includes an integrated communications driver 250 and isused to replace the general purpose embedded controller 270 and externaldriver 250 (shown in FIG. 4). Using this embodiment, the number ofcomponents is reduced as compared to the embodiment of FIG. 5. One suchembedded controller is the ST90XXX series from STMicroElectronics.Specifically, members of the ST90XXX family include complete serialcommunications interfaces (SCI) for communicating with external serialdevices. (Additional details about that family of devices are availablein the June 1998 preliminary technical specification, the contents ofwhich are incorporated herein by reference.) In an alternate embodimentof the present invention shown in FIG. 7, the converter 200 includes apacket-based driver 300, such as an Ethernet controller. (This driver300 likewise can be used with the FPGA implementations of FIGS. 3 and4). Packets destined for the converter (as identified by the header ofthe packet) that are sent by the communications port 210 are stripped oftheir headers and then treated as packets from a direct connection.

In the sixth embodiment, shown in FIG. 8, a combined microprocessor andFPGA design is used. This provides the greatest flexibility of all thedisclosed designs.

As shown in FIG. 9, the converter 200 may also be incorporated into aKVM switch 300 directly. In this embodiment, at least one set of KVMconnections (76, 78 and 80) are replaced with a connection for receivingthe cable 205. The video outputs of the virtual terminal are convertedso as to be output from the switch 300 to either a monitor 120 or toanother switch (74 or 300) in a hierarchy of switches.

As shown in FIG. 10 a, the memory of the converter 200 includes arepresentation of how the emulated screen should look. For each positionon the screen, the memory includes a character to be drawn at thatposition as well as an attribute for that character. Characters can havezero or more attributes applied to them simultaneously. In oneembodiment, each attribute is represented by a single bit of an 8-bitattribute. Thus, the underline bit may be bit zero such that anunderlined character (with no other attributes turned on) would have anattribute of 20=1 (which in hexadecimal notation is indicated as 0x01).As shown in FIG. 10 a, the letters forming the word “text” areunderlined since they each include an attribute set to 0x01.

In order to convert the format of FIG. 10 a into the representationshown in FIG. 10 b, the converter 200 must convert each character into acorresponding set of analog output signals (broken into rows). Forexample, when the converter 200 is beginning the output process for thetext “A line of text.” as shown in FIG. 10 a, the converter 200dedicates the first n pixel values to the first row of the bitmapcorresponding to the letter “A”. For example, as shown in FIG. 10 c, aneight-bit wide bitmap is used to represent the letter “A”. As such,eight pixels are written out (in RGB format) in the background colorsince no pixels are turned on in the first row of the letter “A” bitmap.If space is not already included as part of the character bitmaps, thenthe system would automatically write any standard space betweencharacters (e.g., 2 pixels) in the background color as well. After thefirst line of the bitmaps of all the letters in the row are processed.The converter 200 then generates an HSYNC signal. The next row of thesame bitmaps are subsequently processed. For example, in the second rowof the bitmap corresponding to the letter “A”, two out of 8 pixels arewritten out in the foreground color while the remaining eight arewritten out in the background color.

This process is repeated for the remaining rows in the bitmaps for firstline of text. In the case of characters that are underlined, all pixelsin the underline row (e.g., row 8 of FIG. 10 c) are turned “on” in theforeground color for characters. The process is repeated for theremaining lines of text. In the case of a character with the invertedbit set, the background color is used as the foreground color and viceversa when that character is written out. In an alternate embodiment ofthe present invention, the per-character attributes are extended toinclude foreground and background colors for each character. In thatembodiment it is possible to provide multi-color text as part of theoutput of the converter 200.

Although the virtual terminal (and corresponding actual video signals)is shown as being 80 columns of characters by 25 rows of characters,other configurations are possible. In fact, the system may changeterminal size or font type or size upon request. To change font type,the system changes to using an alternate bitmap for the letters.

In yet another embodiment of the present invention, the converter 200generates a bitmap of the entire screen internally and that bitmap iswritten out line-by-line. In that embodiment, it is possible to generategraphics as well as text. In that embodiment, the interpreted commandsmust be capable of describing the graphics to be drawn. This embodiment,however, requires substantially more memory than the text-basedembodiment. Nonetheless, based on the dramatic decrease in cost ofmemory, this embodiment provides greatly enhanced functionality at amodest increase in price.

The present invention includes numerous alternative embodiment with oneor more emulator types including, but not limited to: VT100, VT52,VT220, VT102, ANSI, ASCII, WYSE, Postscript, Windows GDI calls and JavaAWT calls. Any description language that defines an image and/orinteraction with keyboard and mouse can be emulated using the principlesof the present invention.

The present invention also includes alternative embodiments usingvarious communications ports, including but not limited to: wired (e.g.,RS-232, USB, parallel, Ethernet, Token Ring, FDDI and ATM) and wireless(e.g., Ricochet, RF, and IR).

It is also possible to utilize a core set of functionality (using amicroprocessor, an FPGA or both) that interfaces to various input andoutput “personalities” (which are generally equivalent to the driversshown in FIGS. 3-8). By utilizing the core set of functionality, newdrivers can be developed and interchanged quickly. Such an approach isanalogous to defining an object interface in an object-orientedlanguage.

Some terminals have an audible “click” sound that they produce. Thissound is probably an aural “feel-good” replacement for the old keyboardsthat came with a terminal (the keys were very mechanical and clickedwhen pressed). The mechanical click can be replaced with an electronicsubstitute “click” sound. The sound is produced in response to theconverter receiving a keystroke from the attached keyboard (or switch).When the keystroke is processed the FPGA or microprocessor enables anexternal counter/timer pin which goes to a transistor drive circuit. Thetransistor driver turns on and off current to a speaker thus producingthe “click” sound.

Obviously, numerous modifications and variations of the presentinvention are possible in light of the above teachings. It is thereforeto be understood that, within the scope of the appended claims, theinvention may be practiced otherwise than as specifically describedherein.

1. A KVM switch for connection to a monitor comprising: a communicationsport configured to receive terminal commands; a digital memory; ananalyzer configured to analyze the terminal commands and update adigital representation of a virtual terminal stored in the digitalmemory, based on the terminal commands; a circuit configured to scan thedigital memory and generate analog RGB signals and synchronizationsignals; and analog drivers for driving the analog RGB signals out tothe monitor.